<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let money = 100
    while (true) {
        const result = +prompt(`
        请您选择操作:
         1.存钱
         2.取钱
         3.查看余额
         4.退出
    `)
        if (result === 4) {
            break
        }
        switch (result) {
            case 1:
                let add = +prompt("请输入您的存钱金额")
                money += add
                break;
            case 2:
                let remove = +prompt("请输入您的取钱金额")
                if (remove > money) {
                    alert("额度不足")
                } else {
                    money -= remove
                }
                break;
            case 3:
                alert(`您的总金额是${money}`)
                break;
        }

    }
</script>
</body>
</html>